package com.example.mydemo.mydemo4;
import org.springframework.beans.factory.annotation.Value;

import org.springframework.web.bind.annotation.*;

@RestController
public class MYService {
    @Value("${MyDemo.myName}")
    private String name;
    @Value("${MyDemo.myAge}")
    private String age;

    @GetMapping("/getMyInformation")
    public String geyMyInformation(){
        return name+"---"+age;
    }

    @GetMapping("/getMy")
   public String getMy(){
        return "学好javaEE!";
    }

}